<%@ page language="java" import="java.util.*,java.net.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>

<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html>
<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'login.jsp' starting page</title>
    
    <meta charset="utf-8" />
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<script src="jquery-easyui-1.4.2/jquery.min.js"></script>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
	<script ><%--
	$(document).ready(function(){
		  $("#button").click(function(){
		    var n=$("#username").val();
		    var pwd=$("#password").val();
		    var reb=$("#rememberMe").val();
		    alert(n);
		    name = escape(encodeURIComponent(n));
		    alert(name);
		    $.post("login.action",
		    	    {
		    	      username:name,
		    	      password:pwd,
		    	      rememberMe:reb,
		    	    }
		    );
		  
		  });
		});
	
	--%></script>
  </head>
  
  <body>
    This is my JSP page. login<br><%--
    
    <form id="form">  
            用户名：<input id="username" name="username" />  
                密码：<input id="password" type="password" name="password" />  
            记住我：<input type="checkbox" name="rememberMe" id="rememberMe"/>  
         <input type="button"id="button" name="button" value="login" />  
    </form>  
  --%>
  <body>
    This is my JSP page. login<br>
    
    <form  action="${pageContext.request.contextPath}/login.action" method="post">  
            用户名：<input id="username" name="username" />  
                密码：<input id="password" type="password" name="password" />  
            记住我：<input type="checkbox" name="rememberMe" />  
         <input type="submit" name="submit" value="submit"/>  
    </form>  
  </body>
  </body>
</html>

